<template>
  <div>
    御剑乘风来,除魔天地间!
    <button @click="isShow = !isShow">显示/隐藏</button>
    <transition name="hello" appear>
      <h1 v-show="isShow">你好啊,小姐姐</h1>
    </transition>
  </div>
</template>
<script>
export default {
  name: 'TextCom2',
  data () {
    return {
      isShow: true
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
  }
}
</script>
<style lang='less'  scoped>
h1 {
  background-color: skyblue;
  transition:  1s linear;

}
// 进入起点,离开终点
.hello-enter,
.hello-leave-to {
  transform: translateX(-100%);
}
//离开起点,进入终点
.hello-enter-to,
.hello-leave {
  transform: translateX(0);
}
</style>
